﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MedicWave.Visualization3d
{

    /// <summary>
    /// Projection type
    /// </summary>
    public enum ProjectionType{Orthographic, Perspective};

    /// <summary>
    /// Plot type
    /// </summary>
    public enum PlotType { 
        /// <summary>
        /// Draws a vertical line for each data point
        /// </summary>
        Points, 
        /// <summary>
        /// Draws a spline for each spectrum
        /// </summary>
        Lines,
        /// <summary>
        /// Draws a surface
        /// </summary>
        Surface,
        /// <summary>
        /// Doesn't draw anything
        /// </summary>
        None };


    public enum DataFilteringType {
        /// <summary>
        /// Doesn't apply any filtering to data
        /// </summary>
        NoFiltering,
        /// <summary>
        /// Filters data separately fore each spectrum
        /// </summary>
        Spectrum,
        /// <summary>
        /// Filters data globally per plot
        /// </summary>
        Plot
        
    }

    /// <summary>
    /// Plot settings
    /// </summary>
    public struct PlotSettings
    {
        /// <summary>
        /// Projection type: Orthographic or Perspective
        /// </summary>
        public ProjectionType PlotProjectionType;


        /// <summary>
        /// When true, a logarithmic scale is used for intensity
        /// </summary>
        public bool LogarithmicIntensity;

        /// <summary>
        /// Shows/hides grid
        /// </summary>
        public bool ShowGrid;


        /// <summary>
        /// Plot type
        /// </summary>
        public PlotType PlotType;


        /// <summary>
        /// Data filtering type
        /// </summary>
        public DataFilteringType FilteringType;


        /// <summary>
        /// A value describing how much data to keep (in %). 
        /// </summary>
        /// <example>A value of 10 means that 10% of data points with highest intensity will be kept,
        /// the rest will be filtered out.</example>
        public float FilteringAmount;
        /// <summary>
        /// Minimum Retention Time value, if both MinRT and MaxRT are 0 then all data is included
        /// </summary>
        public float MinRT;


        /// <summary>
        /// Maximum Retention Time value, if both MinRT and MaxRT are 0 then all data is included
        /// </summary>
        public float MaxRT;


        /// <summary>
        /// Minimum M/Z value, if both MinMZ and MaxMZ are 0 then all data is included
        /// </summary>
        public float MinMZ;

        /// <summary>
        /// Maximum m/Z value, if both MinMZ and MaxMZ are 0 then all data is included
        /// </summary>
        public float MaxMZ;


        /// <summary>
        /// Disables data resampling for point and line plots
        /// </summary>
        public bool DisableResampling;

        /// <summary>
        /// Locks plot type, so users cannot change it
        /// </summary>
        public bool LockPlotType;


    }
}
